traverse node 指定元素 (補)


Posted by mijouhsieh on 2023-03-03

:nth-child MDN
.children以外, :nth-child更精確的指定元素

document.querySelector('.static-board tr > td:nth-child(1)').innerText

最後附上HTMLElement & Element的文件供你參考(HTMLElement繼承了Element, 所以包含了Element所有的屬性)

HTMLElement MDN
Element MDN


#Node #:nth-child( )







Related Posts

Day 01 七天學會基本演算法(一)踏入演算法學習前應該了解的資料結構

Day 01 七天學會基本演算法(一)踏入演算法學習前應該了解的資料結構

[AI人工智能] 濾波器 Filter

[AI人工智能] 濾波器 Filter

[NET101] 網路基礎概論 -- 學習日記

[NET101] 網路基礎概論 -- 學習日記


Comments